#include "TextureFactory.h"

#include <algorithm>
#include <Misc/Bind.h>
#include <Thread.h>
#include "../ResourceManager.h"

using namespace Stray;
using namespace Stray::Core;
using namespace Stray::Resource;

TexturePtr TextureFactory::createTexture(const ResourceID& id)
{
	return TexturePtr(new Texture(id));
}

TexturePtr TextureFactory::createTexture(const ResourceID& id, const TextureCreationParam& param)
{
	TexturePtr spTexture = createTexture(id);

	spTexture->build(param);

	return spTexture;
}

void TextureFactory::buildTexture(const TexturePtr& spTexture, const TextureCreationParam& param)
{
	spTexture->build(param);
}
